package com.danciyixue.boot.dcyx.model.form;

import java.io.Serial;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.*;

/**
 * 用户登录验证信息表单对象
 *
 * @author youlaitech
 * @since 2025-06-15 16:37
 */
@Getter
@Setter
@Schema(description = "用户登录验证信息表单对象")
public class UserLoginInfoForm implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "登录ID")
    private Long id;

    @Schema(description = "登录ID或Token")
    @NotBlank(message = "登录ID或Token不能为空")
    @Size(max=128, message="登录ID或Token长度不能超过128个字符")
    private String jId;

    @Schema(description = "加密或序列化的登录数据")
    @NotBlank(message = "加密或序列化的登录数据不能为空")
    @Size(max=65535, message="加密或序列化的登录数据长度不能超过65535个字符")
    private String data;

    @Schema(description = "加密Key")
    @NotBlank(message = "加密Key不能为空")
    @Size(max=256, message="加密Key长度不能超过256个字符")
    private String key;

    @Schema(description = "关联用户ID")
    @NotNull(message = "关联用户ID不能为空")
    private Long userId;

    @Schema(description = "登录时间")
    @NotNull(message = "登录时间不能为空")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime loginTime;


}
